Contents | Index | < Browse | Browse >

LETTERmallocULETTER Allocates memory.

Overview
#include <stdlib.h>

(void) malloc(size);

size_t size;

Portability
ANSI

Description
"malloc" reserves "size" bytes of memory and returns a pointer to the memory area. StormC clears this memory with zero bytes, you should however not rely on this if your program should be portable.
If the memory is not required any longer it should be freed using free. This usually occurs automatically at the end of a program.

Returns
A pointer to the memory area or NULL if no memory could be allocated.

See also
calloc , realloc , free